Add "User Group Diagnostics" Grafana dashboard #149
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new "User Group Diagnostics" Grafana dashboard that complements the "User Diagnostics Dashboard" to show resource usage aggregated by user group.
Requires jupyterhub-groups-exporter to be set up on the hub for the dashboard to work, but if not, then see below.
For this to universally work across differently configured hubs, I decided to separate the "User Group Diagnostics" Grafana dashboard entirely from "User Diagnostics Dashboard". This is because if I combine both labels
username
andusergroup
into one dashboard/PromQL query, then this query would break down for hubs that do not have jupyterhub-groups-exporter set up because thejupyterhub_user_group_info
metric is unavailable. Therefore, if a hub does not have jupyterhub-groups-exporter set up, then the "User Diagnostics" dashboard will work as normal but the "User Group Diagnostics" dashboard will show no data.The "User Diagnostics" dashboard included in this PR differs from the existing version of user.jsonnet, because that is technically a "Pod Diagnostics" dashboard. This PR aggregates pod-level data on a per user basis and uses unescaped usernames from the metric
kube_pod_annotations
, rather than usernames with limited character-sets derived fromkube_pod_labels
.Note
Metrics are available as a time series from the date of initially deploying the
jupyterhub-groups-exporter
service (therefore some PromQL related tousergroup
in this PR would be invalid prior to deployment). If you see an execution error in the dashboard, try selecting a more recent time window when the service is in operation.Ref: 2i2c-org/infrastructure#6065